package bma.common.langutil.bean;

import java.util.List;
import java.util.Map;

import junit.framework.TestCase;
import bma.common.langutil.bean.impl.BeanClassBuilderNative;
import bma.common.langutil.bean.impl.BeanTestObject;

public class BeanTC extends TestCase {

	final org.slf4j.Logger log = org.slf4j.LoggerFactory
			.getLogger(BeanTC.class);

	@Override
	protected void setUp() throws Exception {
		super.setUp();
	}

	public void testNativeBuilder() throws Exception {

		BeanClassBuilderNative b = new BeanClassBuilderNative();
		BeanClass bc = b.createClass(BeanTestObject.class);

		System.out.println(bc);

	}

	public void testNativeBuilder_ListMap() throws Exception {

		BeanClassBuilderNative b = new BeanClassBuilderNative();
		BeanClass bc1 = b.createClass(List.class);

		System.out.println(bc1);

		BeanClass bc2 = b.createClass(Map.class);

		System.out.println(bc2);
	}

	public void testBeanSystem() throws Exception {
		BeanClass b = null;
		b = BeanSystem.getInstance().getBeanClass(BeanTestObject.class);
		System.out.println(b);
		b = BeanSystem.getInstance().getBeanClass(BeanTestObject.class);
		System.out.println(b);
	}
}
